﻿Public Class frm_TableroPrincipal
    'Guardo nombre de la aplicacion'
    Dim ApplicationName As String = "Atlantida v 0.1"
    Private Sub ToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles PagosToolStripMenuItem1.Click, PasajesToolStripMenuItem.Click, PaqueteToolStripMenuItem.Click, CruceroToolStripMenuItem.Click, AsistenciaToolStripMenuItem.Click, UsuariosToolStripMenuItem.Click, SalirToolStripMenuItem1.Click, TableroPasajesToolStripMenuItem.Click, EncuestaPasajesToolStripMenuItem.Click, ImprimirFacturaToolStripMenuItem.Click
        'Defino un tipo de objeto Form
        Dim frm As Form
        Select Case CType(sender, ToolStripMenuItem).ShortcutKeys
            'Formulario alta de usuarios y roles
            Case CType((System.Windows.Forms.Keys.Alt Or System.Windows.Forms.Keys.D0), System.Windows.Forms.Keys)
                frm = New frm_usuario
                'Formulario Venta Pasajes Bus-Tren-Avion-Crucero'
            Case CType((System.Windows.Forms.Keys.Alt Or System.Windows.Forms.Keys.D1), System.Windows.Forms.Keys)
                frm = New frm_pasaje
                'Formulario hospedaje'
            Case CType((System.Windows.Forms.Keys.Alt Or System.Windows.Forms.Keys.D2), System.Windows.Forms.Keys)
                frm = New frm_hospedaje
                'Formulario asistencia'
            Case CType((System.Windows.Forms.Keys.Alt Or System.Windows.Forms.Keys.D3), System.Windows.Forms.Keys)
                'singleton-pendiente
                frm = New frm_asistencia
                'Formulario paquetes'
            Case CType((System.Windows.Forms.Keys.Alt Or System.Windows.Forms.Keys.D4), System.Windows.Forms.Keys)
                frm = New frm_paquete
                'Formulario pago'
            Case CType((System.Windows.Forms.Keys.Alt Or System.Windows.Forms.Keys.D5), System.Windows.Forms.Keys)
                frm = New frm_pago
            Case CType((System.Windows.Forms.Keys.Alt Or System.Windows.Forms.Keys.D6), System.Windows.Forms.Keys)
                'Formulario factura'
                frm = New frm_facturacion
            Case CType((System.Windows.Forms.Keys.Control Or System.Windows.Forms.Keys.D1), System.Windows.Forms.Keys)
                'Tablero para el analisis de los pasajes vendidos'
                frm = New frm_tabpasaje
            Case CType((System.Windows.Forms.Keys.Control Or System.Windows.Forms.Keys.A), System.Windows.Forms.Keys)
                'Tablero para la encuesta de los pasajes vendidos'
                frm = New frm_encpasaje
            Case CType((System.Windows.Forms.Keys.Alt Or System.Windows.Forms.Keys.F4), System.Windows.Forms.Keys)
                'Out!'
                End
            Case Else
        End Select
        'Informo el form en el que esto
        Me.Text = Me.ApplicationName + " - " + CType(sender, ToolStripMenuItem).Text
        frm.WindowState = FormWindowState.Maximized
        frm.MdiParent = Me
        frm.Width = Me.Width
        frm.Height = Me.Height - 35
        frm.Show()
    End Sub
End Class
